package com.example.animal;

import java.time.LocalDate;

/**
 * 企鹅类，继承自鸟类，实现生殖、行走和游泳接口
 */
public class Penguin extends Bird implements Reproduction, Walkable, Swimmable {
    /**
     * 构造函数
     * @param name 动物名称
     * @param speciesName 物种名称
     * @param birthDate 出生日期
     * @param color 颜色
     * @param weight 体重
     * @param gender 性别
     * @param temperatureType 体温类型
     */
    public Penguin(String name, String speciesName, LocalDate birthDate, 
                   String color, double weight, Gender gender, TemperatureRegulation temperatureType) {
        super(name, speciesName, birthDate, color, weight, gender, temperatureType);
    }

    @Override
    public void breathe() {
        System.out.println(name + " " + speciesName + "用肺呼吸");
    }

    @Override
    public void eat() {
        System.out.println(name + " " + speciesName + "进食");
    }

    @Override
    public void reproduce() {
        System.out.println(name + " " + speciesName + "产卵");
    }

    @Override
    public void careForYoung() {
        System.out.println(name + " " + speciesName + "父母共同照顾养育后代");
    }

    @Override
    public void walk() {
        System.out.println(name + " " + speciesName + "在行走");
    }

    @Override
    public void swim() {
        System.out.println(name + " " + speciesName + "在游泳");
    }
}
